组网需求
- 现网中有四台路由器通过IS-IS路由协议实现互联互通
- 要求Router A和Router D数据转发可靠,出现故障时流量不中断
实验拓扑
配置思路
- 配置路由器基本功能以及IP地址
- 配置IS-IS协议以及接口使能IS-IS
- 实现Link T作为Router A到Router D的主链路(修改Cost值)
- 在Router A上配置Auto FRR,实现链路故障时,快速切换到备用链路
配置命令
配置路由器基本功能以及IP地址
Router A配置
1
2
3
4
5
6sys
sys Router A-L1-L2
int g0/0/1
ip add 1.0.0.1 30
int g0/0/0
ip add 2.0.0.1 30
Router B配置
1
2
3
4
5
6sys
sys Router B-L1-L2
int g0/0/1
ip add 3.0.0.1 30
int g0/0/0
ip add 2.0.0.2 30
Router C配置
1
2
3
4
5
6sys
sys Router C-L1-L2
int g0/0/1
ip add 1.0.0.2 30
int g0/0/0
ip add 4.0.0.1 30
Router D配置
1
2
3
4
5
6sys
sys Router D-L1-L2
int g0/0/1
ip add 3.0.0.2 30
int g0/0/0
ip add 4.0.0.2 30
配置IS-IS协议以及接口使能IS-IS
Router A配置
1
2
3
4
5
6
7
8
9
10sys
isis 1
is-level level-1-2
network-entity 10.0010.0000.0001.00
int g0/0/0
isis enable 1
isis small-hello
int g0/0/1
isis enable 1
isis small-hello
Router B配置
1
2
3
4
5
6
7
8
9
10sys
isis 1
is-level level-1-2
network-entity 10.0020.0000.0001.00
int g0/0/0
isis enable 1
isis small-hello
int g0/0/1
isis enable 1
isis small-hello
Router C配置
1
2
3
4
5
6
7
8
9
10sys
isis 1
is-level level-1-2
network-entity 10.0030.0000.0001.00
int g0/0/0
isis enable 1
isis small-hello
int g0/0/1
isis enable 1
isis small-hello
Router D配置
1
2
3
4
5
6
7
8
9
10sys
isis 1
is-level level-1-2
network-entity 10.0040.0000.0001.00
int g0/0/0
isis enable 1
isis small-hello
int g0/0/1
isis enable 1
isis small-hello
实现Link T作为Router A到Router D的主链路(修改Cost值)
Router A配置
1
2
3
4
5sys
int g0/0/1
isis cost 10
int g0/0/0
isis cost 30
Router B配置
1
2
3sys
int g0/0/1
isis cost 10
Router C配置
1
2
3sys
int g0/0/0
isis cost 10
在Router A上配置Auto FRR,实现链路故障时快速切换到备用链路
Router A配置
1
2
3
4sys
isis 1
frr
loop-free-alternate
查看命令
查看到固定网段的路由
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19dis isis route 100.1.1.1 verbose
<Router A-L1-L2>dis isis route 100.1.1.1 verbose
Route information for ISIS(1)
-----------------------------
ISIS(1) Level-2 Forwarding Table
--------------------------------
IPV4 Dest : 100.1.1.0/30 Int. Cost : 20 Ext. Cost : 0
Admin Tag : - Src Count : 1 Flags : A/-/-/-
Priority : Low
NextHop : Interface : ExitIndex :
1.0.0.2 GE0/0/1 0x00000004
(B)2.0.0.2 GE0/0/0 0x00000003
Flags: D-Direct, A-Added to URT, L-Advertised in LSPs, S-IGP Shortcut,
U-Up/Down Bit Set
查看转发表项
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26dis fib 100.1.1.1 verbose
<Router A-L1-L2>dis fib 100.1.1.1 verbose
Route Entry Count: 1
Destination: 100.1.1.0 Mask : 255.255.255.252
Nexthop : 1.0.0.2 OutIf : GigabitEthernet0/0/1
LocalAddr : 1.0.0.1 LocalMask: 0.0.0.0
Flags : DGU Age : 2773sec
ATIndex : 0 Slot : 0
LspFwdFlag : 0 LspToken : 0x0
InLabel : NULL OriginAs : 0
BGPNextHop : 0.0.0.0 PeerAs : 0
QosInfo : 0x0 OriginQos: 0x0
备份链路
NexthopBak : 2.0.0.2 OutIfBak : GigabitEthernet0/0/0
LspTokenBak: 0x0 InLabelBak : NULL
LspToken_ForInLabelBak : 0x0
EntryRefCount : 0
VlanId : 0x0
BgpKey : 0
BgpKeyBak : 0
LspType : 0 Label_ForLspTokenBak : 0
MplsMtu : 0 Gateway_ForLspTokenBak : 0.0.0.0
NextToken : 0x0 IfIndex_ForLspTokenBak : 0
Label_NextToken : 0 Label : 0
LspBfdState : 0
查看流量保护类型
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43dis isis spf-tree systemid 0040.0000.0001 verbose
<Router A-L1-L2>dis isis spf-tree systemid 0040.0000.0001 verbose
Shortest Path Tree for ISIS(1)
------------------------------
ISIS(1) Level-1 Shortest Path Tree
----------------------------------
0040.0000.0001.00
Distance : 10
Distance-URT : 10
Flags : SPT/V6_Islt
IPv4 Nexthops-URT : 1
(1) 1.0.0.2 IF:GE0/0/1 NBR:0040.0000.0001.00
IPv6 Nexthops : 0
Neighbors: 2 (Children:1 Parents:1 Others:0)
(1) >0010.0000.0001.02
Cost : 10
Flags : Parent
(2) 0040.0000.0001.01
Cost : 10
Flags : Child
ISIS(1) Level-2 Shortest Path Tree
----------------------------------
0040.0000.0001.00
Distance : 10
Distance-URT : 10
Flags : SPT/V6_Islt
IPv4 Nexthops-URT : 1
(1) 1.0.0.2 IF:GE0/0/1 NBR:0040.0000.0001.00
IPv6 Nexthops : 0
Neighbors: 2 (Children:1 Parents:1 Others:0)
(1) >0010.0000.0001.02
Cost : 10
Flags : Parent
(2) 0040.0000.0001.01
Cost : 10
Flags : Child